﻿#region  Copyright (C) 2013 Unisys Corporation

// =============================================================================================
// All Rights Reserved. This work contains trade secrets and confidential material of UNISYS, 
// and its use or disclosure in whole or in part without explicit written permission of 
// UNISYS is prohibited. 
//  
// Product Name          :  Unisys e-Workflow and Imaging
// File Name             :  fUnits.cs
// Authored By           :  Unisys Corporation
// =============================================================================================
//	Modified by                         Date            Version
// =============================================================================================
//	ronald.aguilar@cr.unisys.com      Jun 06, 2013    Initial Version
// =============================================================================================
#endregion

#region Using  Region
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
#endregion
namespace TestSplashScreen
{
    public partial class fUnits : Form
    {
        public string units;
        public fUnits()
        {
            InitializeComponent();
        }

        private void btn_Cancel_Click(object sender, EventArgs e)
        {
            Close();
        }

        private void btn_Save_Click(object sender, EventArgs e)
        {
            if (dgv_Units.RowCount > 1)
            {
                for (int i = 0; i < dgv_Units.RowCount - 1; i++)
                {
                    units += dgv_Units.Rows[i].Cells[0].Value.ToString() + ",";
                }

                units = units.Remove(units.Length - 1);
                //MessageBox.Show("Unidades guardadas con exito");
                this.Close();
            }
            else
            {
                units = "";
                //MessageBox.Show("Unidades guardadas con exito");
                this.Close();
            }

        }
    }
}
